package br.com.news.web.service;

import javax.ws.rs.core.MediaType;

import br.com.news.utils.database.beans.UsuarioBean;

import com.google.gson.Gson;
import com.sun.jersey.api.client.Client;

public class CadastroService {

	public CadastroService() {

	}

	public void save(UsuarioBean usuarioBean) {

			Gson g = new Gson();
			String json = g.toJson(usuarioBean);

			Client c = Client.create();
		    c.resource("http://localhost:8080/news-web-service-rest/Usuario/insert").type(MediaType.APPLICATION_JSON).post(json);

	}

}
